<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/resources/template/template.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ca="http://java.sun.com/jsf/composite/cashSummery"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core">

    <ui:define name="content">
        <h:form id="panelPrint" >
            <p:panel>

                <p:commandButton ajax="false" value="Process" 
                                action="#{reportMemberShip.createOpdPriceAdjustments()}"/>

                <p:dataTable value="#{reportMemberShip.opdMemberShip}" var="pI">
                    <p:subTable value="#{pI.priceMatrixs}" var="inw">
                        <f:facet name="header">
                            <h:outputLabel value="#{pI.membershipScheme.name}"/>
                        </f:facet>
                        <p:column >
                            <h:panelGroup rendered="#{inw.department ne null}">
                                <h:outputLabel value="#{inw.department.name} "/>
                                <h:outputLabel value=" [Department]"/>                                
                            </h:panelGroup>
                            <h:panelGroup rendered="#{inw.category ne null}">
                                <h:outputLabel value="#{inw.category.name} "/>
                                <h:outputLabel value=" [Category]"/>
                            </h:panelGroup>
                        </p:column>
                        <p:column>
                            #{inw.discountPercent}
                        </p:column>
                    </p:subTable>
                </p:dataTable>

            </p:panel>

        </h:form>
    </ui:define>


</ui:composition>
